<?php
	class Model_tags extends CI_Model{
		protected $_table = "tbl_categorie";
		protected $_games = "tbl_games";
		public function __construct(){
			parent::__construct();
		}
		public function getdata($id){
			$this->db->where("rewrite",$id);
			return $this->db->get($this->_table)->row_array();
		}
		public function count_all($id){
			$this->db->where("tagid",$id);
			return $this->db->count_all_results($this->_games);
		}
		public function listall($id,$off,$start){
			$this->db->where("tagid",$id);
			$this->db->limit($off,$start);
			return $this->db->get($this->_games)->result_array();
		}
	}